//
//  TOMyActivityCell.m
//  X-Tribe
//
//  Created by Miss.Ou on 16/4/6.
//  Copyright © 2016年 Miss.Ou. All rights reserved.
//

#import "TOMyActivityCell.h"

@interface TOMyActivityCell ()

@property(nonatomic,strong)UIButton *btn;

@end

@implementation TOMyActivityCell

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        [self createCell];
    }
    
    return self;
}

-(void)createCell{

    self.btn = [UIButton buttonWithType:UIButtonTypeCustom];
    [_btn setTitle:@"上传活动图片" forState:UIControlStateNormal];
    _btn.backgroundColor = [UIColor blackColor];
    [self.contentView addSubview:_btn];
    [_btn mas_makeConstraints:^(MASConstraintMaker *make) {
        
        make.top.mas_equalTo(20);
        make.right.mas_equalTo(-20);
        make.height.mas_equalTo(20);
        make.width.mas_equalTo(100);
    }];
    
    [_btn addTarget:self action:@selector(btnAction:) forControlEvents:UIControlEventTouchUpInside];
}
-(void)btnAction:(UIButton *)btn{
    
    [self.myActivityCellDelegate JumpToAddPic];
}


- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
